package cn.org.gs.path;

import java.nio.file.Path;
import java.nio.file.Paths;

public class PathDemo {

    public static void main(String[] args) {
        Path path = Paths.get("d:\\1.txt");

        Path projects = Paths.get("d:\\atguigu", "projects");

        Path file = Paths.get("d:\\atguigu", "projects\\1.txt");

        System.out.println(path + "\n" + projects + "\n" + file);

        String originalPath = "d:\\atguigu\\projects\\..\\yygh-project";
        Path path1 = Paths.get(originalPath);
        Path path2 = path1.normalize();
        System.out.println("path1 : " + path1);
        System.out.println("path2 : " + path2);


    }
}
